package com.xujie.sportsmeeting.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.xujie.sportsmeeting.entity.NoticeReadRecord;

import java.util.List;

/**
 * 公告阅读记录服务接口
 */
public interface NoticeReadRecordService extends IService<NoticeReadRecord> {

    /**
     * 记录阅读
     */
    boolean recordRead(Long noticeId, Long userId);

    /**
     * 确认阅读
     */
    boolean confirmRead(Long noticeId, Long userId);

    /**
     * 检查是否已阅读
     */
    boolean hasRead(Long noticeId, Long userId);

    /**
     * 检查是否已确认
     */
    boolean hasConfirmed(Long noticeId, Long userId);

    /**
     * 获取用户阅读记录
     */
    List<NoticeReadRecord> getUserReadRecords(Long userId);

    /**
     * 获取公告阅读统计
     */
    Long getNoticeReadCount(Long noticeId);

    /**
     * 获取公告确认统计
     */
    Long getNoticeConfirmCount(Long noticeId);

    /**
     * 获取未确认用户列表
     */
    List<Long> getUnconfirmedUsers(Long noticeId);

    /**
     * 批量确认阅读
     */
    boolean batchConfirmRead(List<Long> noticeIds, Long userId);
}
